{% load media %}{% load controls %}
{% extends "admin_content.html" %}

{% block subheader %}
	<h1>Paydetails dell'utente {{ user.username }}</h1>
{% endblock %}

{% block content %}
<div class="fieldset">
    <div id="users_table">
        <h1>Seleziona dettaglio di pagamento da modificare</h1>
        <table>
            <thead>
                <tr>
                	<th>#</th>
                    <th>Nome</th>
                    <th>Indirizzo</th>
                    <th>Citt&agrave</th>
                    <th>Provincia</th>
                    <th>Partita iva</th>
		    		<th>Codice fiscale</th>
		    		<th>Legale rappresentante</th>
		    		<th>Opzioni</th>
                </tr>
            </thead>
            {% for bill in bills %}
                <tr>
                	<td>{{forloop.counter}}</td>
                    <td><a href="/admin/users/{{user.username}}/paymethod/{{bill.id}}/">{{bill.name}}</a></td>
                    <td>{{bill.address}}</td>
                    <td>{{bill.city}}</td>
                    <td>{{bill.provincia}}</td>
                    <td>{{bill.partita_iva}}</td>
                    <td>{{bill.codice_fiscale}}</td>
                    <td>{{bill.Legale_rappresentante}}</td>
		    		<td><a title="cancella" href="/admin/users/{{user.username}}/paymethod/{{bill.id}}/delete/">del</a></td>
                </tr>
            {% endfor %}
        </table>
        <div id="add_user_button"><a href="/admin/users/{{user.username}}/paymethod/add/">Aggiungi Paydetail</a></div>
    </div>
</div>
{% endblock %}
